package loadsave.loadsaveobject;

import loadsave.Memento;
import loadsave.Saver;

public abstract class LoadSaveObject implements Iterable<LoadSaveObject> {
	String name, type;
	
	LoadSaveObject(String name, String type) {
		this.name = name;
		this.type = type;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getType() {
		return type;
	}
	
	public void setType(String type) {
		this.type = type;
	}
	
	public String getValue() {
		throw new RuntimeException("getValue() is not supported for this type of LoadSaveObject");
	}
	
	public LoadSaveObject get(String id) {
		throw new RuntimeException("get(String) is not supported for this type of LoadSaveObject");
	}
	
	public abstract void save(Saver s);
	
	public abstract String toString(); 
}
